﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace CarSales.Models
{
    public class Car
    {
        [Key]        
        public int CarId { get; set; }
        [Display(Name="Title")]
        public string CarTitle { get; set; }
        [Display(Name = "Make")]
        public string CarMake { get; set; }
        [Display(Name = "Model")]
        public string CarModel { get; set; }
        [Display(Name = "Color")]
        public string CarColor { get; set; }
        [Display(Name = "Description")]
        public string CarShortDescription { get; set; }
        [Display(Name = "Details")]
        public string CarLongDescription { get; set; }
        [Display(Name = "Created")]
        public DateTime CarDateEntered { get; set; }
        [Display(Name = "Updated")]
        public DateTime CarDateUpdated { get; set; }
        [ForeignKey("Owner")]
        public int  CarOwnerId { get; set; }

        public virtual ICollection<ImageResource> ImageResources { get; set; }
        public virtual Owner Owner { get; set; }
    }
}